package com.atguigu.spring.beans.factory;

import java.util.HashMap;
import java.util.Map;

public class InstanceCarFactory {
    private Map<String,Car> cars=null;

	public InstanceCarFactory() {
		cars = new HashMap<String,Car>();
		cars.put("Aodi", new Car("Aodi",300000));
    	cars.put("Ford", new Car("Ford",400000)); 
	}
	public Car getCar(String name){
		return cars.get(name);
	}
}
